package com.sskj.mine.asset.data;

import com.sskj.lib.util.CoinUtil;
import com.sskj.lib.util.TimeFormatUtil;

import java.util.Date;

public class RecordsBean {

    /**
     * id : 1
     * addtime : 2019-05-03 10:47:42
     * price : 1000.0000
     * state : 2
     * pid : 1
     * address : 0x16546as4d98as4d6as4d6
     * check_time : 2019-05-03 10:47:42
     * memo : 1
     */

    private String id;
    private String addtime;
    private String price;
    private String state;
    private String pid;
    private String qianbao_url;
    private String check_time;
    private String memo;
    private String pname;

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public String getPrice() {
        return CoinUtil.keepCoinNumMax(pname,price);
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getQianbao_url() {
        return qianbao_url;
    }

    public void setQianbao_url(String qianbao_url) {
        this.qianbao_url = qianbao_url;
    }

    public String getCheck_time() {
        try {

            return TimeFormatUtil.SF_FORMAT_E.format(new Date(Long.valueOf(check_time) * 1000));
        } catch (Exception e) {
            if (check_time!=null&&check_time.startsWith("20")){
                return check_time;
            }else {
                return "--";
            }
        }
    }

    public void setCheck_time(String check_time) {
        this.check_time = check_time;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }
}
